package com.graduation.lastproject.service.business.businessBasicActive.impl;

import com.graduation.lastproject.dao.business.BusinessDao;
import com.graduation.lastproject.entity.Business;
import com.graduation.lastproject.entity.HotelInfo;
import com.graduation.lastproject.service.business.businessBasicActive.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class IBusinessService implements BusinessService {


    @Autowired
    BusinessDao businessDao;
    @Override
    public int insertInfo(Map<String, String[]> map) {
        return businessDao.insertInfo(map);
    }

    @Override
    public int insertInfo1(Map<String, Object> map) {
        return businessDao.insertInfo1(map);
    }

    @Override
    public int insertPicInfo(Map<String, Object> info) {
        return  businessDao.insertPicInfo(info);
    }

    @Override
    public int updatePicInfo(Map<String, Object> info) {
        return businessDao.updatePicInfo(info);
    }

    @Override
    public boolean getBusinessPhone(String bphone) {
        return businessDao.getBusinessPhone(bphone);
    }

    @Override
    public int insertBusinessInfo(Map<String, Object> map) {
        return businessDao.insertBusinessInfo(map);
    }

    @Override
    public int uploadBusinessInfo(Map<String, Object> map) {
        return businessDao.updateBusinessInfo(map);
    }

    @Override
    public Business getByLogsinName(String loginname) {
        return businessDao.getByLogsinName(loginname);
    }

    @Override
    public HotelInfo getHotelInfoByBphone(String bphone) {
        return businessDao.getHotelInfoByBphone(bphone);
    }

    @Override
    public void updateHotelInfoBphone(Map<String,Object> map) {
           businessDao.updateHotelInfoBphone(map);
    }
}
